//
//  MineViewController.m
//  TTFriend
//
//  Created by 李正兵 on 2019/5/5.
//  Copyright © 2019 李正兵. All rights reserved.
//

#import "MineViewController.h"
#import "Login/LoginManager.h"
#import "UIViewController+Login.h"

@interface MineViewController ()

@property (weak, nonatomic) IBOutlet UILabel *userNamLabel;
@end

@implementation MineViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    self.tabBarController.title = @"我的";
    self.userNamLabel.text = [LoginManager shareManager].userAccount;
}
- (IBAction)logout:(id)sender {
    [[LoginManager shareManager] logoutWithCompletion:^{
        [self showLogin];
    }];
}
- (void)showLogin {
    [self openLogin:nil];
}
@end
